<script type="text/javascript">
    var _switch_name = '${tagSett.name}';
    var dft = '${tagSett.dft}';
    //初始化控件
    $(function(){
        $('#'+_switch_name+'_switch').lc_switch();
        //默认选中是
        if(dft=='true')
        {
            $('#'+_switch_name+'_switch').lcs_on();
        }
    })

    //表单loadSuccess的时候触发
    function ${tagSett.name}_switch_loadSuccess(info)
    {
        if(info['${tagSett.name}']==1)
        {
            $('#'+_switch_name+'_switch').lcs_on();
        }else if(info.is_disable==0){
             $('#'+_switch_name+'_switch').lcs_off();
        }
    }

    //表单保存的时候
    function ${tagSett.name}_switch_onSave(info)
    {
        var _isSwitchCheck= $('#'+_switch_name+'_switch').is(':checked');
        $('#'+_switch_name).val(_isSwitchCheck ? 1:0);
        return true;
    }

</script>